home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / clipper / clipmous.zip / MOUSTEST.PRG < prev   
Text File  |  1992-03-25  |  971b  |  37 lines

  1. ** little program to test CLIPMOUS.LIB
  2. ** compile with: CLIPPER moustest
  3. ** link with   : RTLINK FILE moustest LIBRARY clipmous
  4. ********************************************************
  5.  
  6. OK = Minit()    && mouse initialization
  7.  
  8. if OK = 0
  9.         ?
  10.         ? "mouse driver not installed! -- return to dos :-("
  11.         ?
  12.         RETURN
  13. endif
  14.  
  15.  
  16. clear screen
  17. set cursor off
  18. Mshow()         && show mouse cursor
  19.  
  20. @0,0 say space(6)+"Column"+space(6)+"Line"+space(6)+"Button"+space(6)+"Last"
  21. @1,0 say space(6)+"------"+space(6)+"----"+space(6)+"------"+space(6)+"----"
  22. @24,0 say "Click here to exit!"
  23.  
  24. do while .t.
  25.  @2,0 say ""
  26.  ? Mx(), My(), Mbout(), Mlast()     && colomn and line of mouse cursor with
  27.                                     &&          button ans last button status
  28.  if My() = 25 .and. Mx() < 20 .and. Mbout() > 0
  29.         @10,38 say "EXIT!"
  30.         exit
  31.  endif
  32. enddo
  33.  
  34. Mend()         && remove mouse support
  35. clear screen
  36. return
  37.